package com.linkage.bookshop.service.inter;

import java.util.List;

import javax.servlet.http.Cookie;

import com.linkage.bookshop.model.Trolleyline;

public interface TrolleyService {
	// 加入购物车
	public Cookie joinTrolley(Cookie[] cookies, String username, int bookId,
			int amount);

	// 从购物车移除
	public Cookie removeFromTrolley(Cookie[] cookies, String username,
			int bookId, int amount);

	// 查看购物车
	public List<Trolleyline> checkTrolley(Cookie[] cookies, String username);

	// 验证削减数量是否合法
	public boolean checkAmount(Cookie[] cookies, String username, int bookId,
			int amount);
	/*移除cookie*/
	public Cookie removeCookie(String username,Cookie[] cookies);

}
